type HTTP_STATUS_TYPE = {
  [key: number | string]: string
}
export const messageMatch = (status: string | number): string => {
  const HTTP_STATUS: HTTP_STATUS_TYPE = {
    400: 'wrong request',
    401: 'Unauthorized, please log in again',
    403: 'access denied',
    404: 'request error',
    408: 'Request timed out',
    500: 'Server Error',
    501: 'service not implemented',
    502: 'Network Error',
    503: 'service is not available',
    504: 'network timeout',
    505: 'HTTP version not supported',
  }
  const message = HTTP_STATUS[status] || 'connection error'
  return `${message}, please check the network or contact your administrator!`
}
